{extend name="public:base" /}

{block name="content"}
	
<div class="page-header">
	<a href="{:url('AuthManager/create_group')}" class="btn btn-primary">新增用户组</a>
</div>		
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<th>用户组</th> 	
						<th>描述</th> 	
						<th>授权</th> 	
						<th>状态</th> 	
						<th>操作</th>	
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="d" empty="$empty"}
						<tr>													
							<td>
								<a href='{:url("AuthManager/edit_group",array("id"=>$d["id"]))}'>
									{$d.title}
								</a> 
							</td>
							<td>{$d.description	}</td>
							<td>
								<a href='{:url("AuthManager/access",array("id"=>$d["id"]))}'>
									访问授权
								</a> 
							</td>
							<td>							
							{switch name="d.status"}
								{case value="1"}<a href='{:url("AuthManager/set_status",array("id"=>$d["id"],"status"=>0))}'><span class="btn btn-xs btn-success"><i class="fa fa-check bigger-120"></i></span></a>{/case}
								{case value="0"}<a href='{:url("AuthManager/set_status",array("id"=>$d["id"],"status"=>1))}'><span class="btn btn-xs btn-danger"><i class="fa fa-remove bigger-120"></i></span></a>{/case}
							{/switch}
								
							</td>
							<td>
								
								<a class="delete btn btn-xs btn-danger" href='{:url("AuthManager/del_group",array("id"=>$d["id"]))}' >
									<i class="fa fa-trash bigger-120"></i>
								</a>
								
							</td>
						</tr>
						{/volist}	
						
						<tr>
							<td colspan="20" class="page">{$list->render()}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}
